/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
 * Nihongo
 * Copyright (C) Massimiliano Maniscalco 2011, 2012 <massi.neptune@yahoo.com>
 * 
Nihongo is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Nihongo is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef _PRINTABLEWINDOW_H_
#define _PRINTABLEWINDOW_H_

#include <gtkmm.h>

class DrawingKanjiSheet;
class PrintKanjiTableOperation;

class PrintableWindow: public Gtk::Window 
{
public:
	PrintableWindow ();
	virtual ~PrintableWindow ();
	inline Gtk::ScrolledWindow* get_scrolled_window ( void ) { return &_scrolledWin; }
	inline void set_drawing_area ( DrawingKanjiSheet *kp ) { _kakuArea = kp; }
	
protected:
	void build_menu ();
	void onMenuPrint ();
	void onMenuClose ();
	void print_or_preview ( Gtk::PrintOperationAction print_action );
	void on_printOperation_status_changed ( const Glib::RefPtr<PrintKanjiTableOperation>& operation );
	void on_printOperation_done ( Gtk::PrintOperationResult result, const Glib::RefPtr<PrintKanjiTableOperation>& operation );

	Glib::RefPtr<Gtk::PageSetup> m_refPageSetup;
	Glib::RefPtr<Gtk::PrintSettings> m_refSettings;

	Gtk::Box m_vBox;
	Gtk::ScrolledWindow _scrolledWin;
	DrawingKanjiSheet *_kakuArea;
	Glib::RefPtr<Gtk::UIManager> m_refUIManager;
	Glib::RefPtr<Gtk::ActionGroup> m_refActionGroup;

private:

};

#endif // _PRINTABLEWINDOW_H_
